﻿using Wolfpack.Core.Configuration;
using Wolfpack.Core.Interfaces.Entities;
using Wolfpack.Core;
using Wolfpack.Core.Notification.Filters.Request;

namespace Wolfpack.Contrib.Checks.Fake
{
    public class FakeCheckConfigurationDiscovery : HealthCheckDiscoveryBase<FakeCheckConfig, FakeCheck>
    {
        protected override FakeCheckConfig GetConfiguration()
        {
            return new FakeCheckConfig
                       {
                           Enabled = true,
                           FriendlyId = "CHANGEME!",
                           NotificationMode = AlwaysPublishNotificationFilter.FilterName,
                           Result = false
                       };
        }

        protected override void Configure(ConfigurationEntry entry)
        {
            entry.Name = "FakeCheck";
            entry.Description = "Fake HealthCheck always returns the result you have configured it for. This is useful when you are testing other parts of the system and need a consistent result.";
            entry.Tags.AddIfMissing("Testing");
        }
    }
}